﻿using System;
using System.Text;

namespace Lypshare.Net.Client
{
	/// <summary>
	/// Connection event arguments.
	/// </summary>
	/// <exception cref='ArgumentNullException'>
	/// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
	/// </exception>
    public class ConnectionEventArgs : EventArgs
    {
        // --------------------------------------------------------
        // Class Properties
        // --------------------------------------------------------


        /// <summary>
        /// Gets or sets the connection.
        /// </summary>
        /// <value>
        /// The connection.
        /// </value>
        public IConnection Connection 
        { 
            get; 
            private set; 
        
        } // Property: Connection


        // --------------------------------------------------------
        // Class Functions
        // --------------------------------------------------------


        /// <summary>
        /// Initializes a new instance of the <see cref="Lypshare.Net.Client.ConnectionEventArgs"/> class.
        /// </summary>
        /// <param name='connection'>
        /// Connection.
        /// </param>
        /// <exception cref='ArgumentNullException'>
        /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
        /// </exception>
        public ConnectionEventArgs(IConnection connection)
        {
            if (connection == null)
                throw new ArgumentNullException("connection");

            Connection = connection;

        } // Constructor

    } // class ConnectionEventArgs
} // namespace Lypshare.Net.Client